//********************************************************************************************************
// Product Name: MapWindow.dll Alpha
// Description:  The basic module for MapWindow version 6.0
//********************************************************************************************************
// The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); 
// you may not use this file except in compliance with the License. You may obtain a copy of the License at 
// http://www.mozilla.org/MPL/ 
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
// ANY KIND, either expressed or implied. See the License for the specificlanguage governing rights and 
// limitations under the License. 
//
// The Original Code is from MapWindow.dll version 6.0
//
// The Initial Developer of this Original Code is Ted Dunsford. Created 3/8/2008 7:11:03 AM
// 
// Contributor(s): (Open source contributors should list themselves and their modifications here). 
//
//********************************************************************************************************

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;

using MapWindow;
using MapWindow.Main;
using MapWindow.Data;
using MapWindow.Drawing;
using MapWindow.Geometries;

using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;

namespace MapWindow.Drawing
{


    /// <summary>
    /// ITexture
    /// </summary>
    public interface ITextureDX
    {
       

        #region Methods

        /// <summary>
        /// Generates a new texture using the specified image.
        /// </summary>
        /// <param name="device">The Graphics device to specify what type of texture should be created.</param>
        /// <param name="image">A System.Drawing.Drawing2D Image object to create a texture from.</param>
        void FromBitmap(Device device, Bitmap image);

        /// <summary>
        /// Instructs the texture to load from the file.
        /// </summary>
        /// <param name="device">The Device to use to load the value.  This should match the form of the graphics object used.</param>
        /// <param name="filename">The string filename of the actual file to load</param>
        void Load(Device device, string filename);

        /// <summary>
        /// Disposes the texture.
        /// </summary>
        void Dispose();
        

        /// <summary>
        /// this will force the texture to reload
        /// </summary>
        void ResetTexture();

        /// <summary>
        /// Converts the texture memory object from its native format into an image
        /// </summary>
        /// <returns>A System.Drawing.Image that should be converted into a texture</returns>
        Image ToImage();
        
        /// <summary>
        /// Saves the file using the specified filename.  The image format will be determined from the filename.
        /// </summary>
        /// <param name="filename">The string filename.</param>
        void Save(string filename);
        

        /// <summary>
        /// Saves the texture using the current filename, determining the image format from the extension.
        /// </summary>
        void Save();


        #endregion

        #region Properties

      

        /// <summary>
        /// Gets or sets a string filename where this texture is found on the disk.
        /// </summary>
        string Filename
        {
            get;
            set;
        }

        /// <summary>
        /// Checks to see if the texture has been loaded.  (true as long as the internal texture is not null.)
        /// </summary>
        bool IsLoaded
        {
            get;
        }


     
        
      



        #endregion



    }
}
